const http = uni.$u.http

// 注册
export const register = (data) => {
	return http.post('', {
		serviceName: 'CustomerService',
		methodName: 'register',
		bizParams: {
			...data
		}
	})
}
// 登陆
export const login = (data) => {
	return http.post('', {
		serviceName: 'CustomerService',
		methodName: 'login',
		bizParams: {
			...data
		}
	})
}
// 微信授权登陆
export const getUserInfo = (data) => {
	return http.post('', {
		serviceName: 'CustomerService',
		methodName: 'getUserInfo',
		bizParams: {
			...data
		}
	})
}

// 查询用户加入的dao
export const getMyDaos = (data) => {
	return http.post('', {
		serviceName: 'CustomerService',
		methodName: 'getMyDaos',
		bizParams: {
			...data
		}
	})
}

// 查询客户详细信息
export const getCustomerDetail = (data) => {
	return http.post('', {
		serviceName: 'CustomerService',
		methodName: 'getDetail',
		bizParams: {
			...data
		}
	})
}

// 查询NFT mint详细
export const getNftThemeMintDetail = (data) => {
	return http.post('', {
		serviceName: 'NftThemeService',
		methodName: 'getMyNftDetail',
		bizParams: {
			...data
		}
	})
}

// 查询客户详细信息
export const getMyDigitalAssets = (data) => {
	let {
		pageNo,
		pageSize,
	} = data
	return http.post('', {
		serviceName: 'CustomerService',
		methodName: 'getMyDigitalAssets',
		bizParams: {
			...data
		},
		pagination: {
			pageNum: pageNo,
			pageSize
		}
	})
}

// 查询客户详细信息
export const getMyAccountSerialList = (data) => {
	return http.post('', {
		serviceName: 'CustomerService',
		methodName: 'getMyAccountSerialList',
		bizParams: {
			...data
		}
	})
}

// 设置客户信息
export const settingCostomerInfo = (data) => {
	return http.post('', {
		serviceName: 'CustomerService',
		methodName: 'settingCostomerInfo',
		bizParams: {
			...data
		}
	})
}
